From 852ed0aaf07ad074ac111b1a432de5b816aad7fd Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 18 May 2010 13:41:55 +0100 Subject: [PATCH] cpu hotplug: tasklet and timer initialisation is high priority. Signed-off-by: Keir Fraser --- xen/common/tasklet.c | 3 ++- xen/common/timer.c | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/xen/common/tasklet.c b/xen/common/tasklet.c index 2e23232c41..3dff65074e 100644 --- a/xen/common/tasklet.c +++ b/xen/common/tasklet.c @@ -188,7 +188,8 @@ static int cpu_callback( } static struct notifier_block cpu_nfb = { - .notifier_call = cpu_callback + .notifier_call = cpu_callback, + .priority = 99 }; void __init tasklet_subsys_init(void) diff --git a/xen/common/timer.c b/xen/common/timer.c index 0759df818f..57d488ce9a 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -521,18 +521,29 @@ static int cpu_callback( struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; + struct timers *ts = &per_cpu(timers, cpu); - if ( action == CPU_UP_PREPARE ) + switch ( action ) { - spin_lock_init(&per_cpu(timers, cpu).lock); - per_cpu(timers, cpu).heap = &dummy_heap; + case CPU_UP_PREPARE: + spin_lock_init(&ts->lock); + ts->heap = &dummy_heap; + break; + case CPU_UP_CANCELED: + case CPU_DEAD: + /* Enable this later. */ + /*WARN_ON(GET_HEAP_SIZE(ts->heap) || ts->list);*/ + break; + default: + break; } return NOTIFY_DONE; } static struct notifier_block cpu_nfb = { - .notifier_call = cpu_callback + .notifier_call = cpu_callback, + .priority = 99 }; void __init timer_init(void) -- 2.30.2